//
//  UIWindow_Kit.swift
//  
//
//  Created by xp on 2023/4/21.
//

import UIKit

public extension UIWindow {
    static var current: UIWindow? {
        var window: UIWindow?
        if #available(iOS 13, *) {
            window = UIApplication.shared.connectedScenes.compactMap({ $0 as? UIWindowScene }).flatMap({ $0.windows }).first
        } else {
            window = UIApplication.shared.windows.first
        }
        return window
    }
}


